home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
tex
/
td187src.lzh
/
MAGICBIO.D
< prev
next >
Wrap
Text File
|
1991-06-08
|
5KB
|
146 lines
(*######################################################################
MAGIC Modula's All purpose GEM Interface Cadre
¯ ¯ ¯ ¯ ¯
########################################################################
BIOS Basic Input Output System Interface for Modula-2
########################################################################
V2.01 23.12.90 Jens Pirnay Korrektur von PD
V2.0 17.10.90 Peter Hellinger Anpassung an neues MagicSys
V1.0 (C) by Peter Hellinger
######################################################################*)
DEFINITION MODULE MagicBIOS;
FROM SYSTEM IMPORT ADDRESS;
FROM MagicSys IMPORT Nil, Null,
Bit0, Bit1, Bit2, Bit3, Bit4, Bit5, Bit6, Bit7,
Bit8, Bit9, Bit10, Bit11, Bit12, Bit13, Bit14, Bit15,
LOC, Byte, ByteSet, sWORD, sINTEGER, sCARDINAL, sBITSET,
lWORD, lINTEGER, lCARDINAL, lBITSET;
TYPE PtrPD = POINTER TO PD;
PD = RECORD
pLowtpa: ADDRESS;
pHitpa: ADDRESS;
pTbase: ADDRESS;
pTlen: lCARDINAL;
pDbase: ADDRESS;
pDlen: lCARDINAL;
pBbase: ADDRESS;
pBlen: lCARDINAL;
pDta: ADDRESS;
pParent: PtrPD;
res1: ADDRESS;
pEnv: ADDRESS;
devx: ARRAY [0..5] OF Byte;
res2: Byte;
defdrv: Byte;
(** Tippfehler: ==> pUndef: ARRAY [0..17] OF Byte; **)
pUndef: ARRAY [0..71] OF Byte;
pCmdlin: ARRAY [0..126] OF CHAR;
END;
TYPE PtrMD = POINTER TO MD;
MD = RECORD
mLink: PtrMD;
mStart: ADDRESS;
mLength: lCARDINAL;
mOwn: PtrPD;
END;
TYPE PtrMPB = POINTER TO MPB;
MPB = RECORD (* memory parameter block *)
mpMfl: PtrMD; (* memory free list *)
mpMal: PtrMD; (* memory allocated list *)
moRover: PtrMD; (* roving pointer *)
END;
PROCEDURE Getmpb (VAR mpb: ADDRESS);
CONST PRT = 0;
AUX = 1;
CON = 2;
MIDI = 3;
IKBD = 4;
RAWCON = 5;
PROCEDURE Bconstat (device: sINTEGER): BOOLEAN;
PROCEDURE Bconin (device: sINTEGER): lCARDINAL;
PROCEDURE Bconout (device: sINTEGER; c: CHAR);
CONST DrvA = 0;
DrvB = 1;
DrvC = 2;
DrvD = 3;
DrvE = 4;
DrvF = 5;
DrvG = 6;
DrvH = 7;
DrvI = 8;
DrvJ = 9;
DrvK = 10;
DrvL = 11;
DrvM = 12;
DrvN = 13;
DrvO = 14;
DrvP = 15;
CONST Read = 0;
Write = 1;
ReadNoMC = 2;
WriteNoMC = 3;
PROCEDURE Rwabs (rw: sINTEGER; buf: ADDRESS; count, recno, dev: sINTEGER): lINTEGER;
PROCEDURE Setexc (vecnum: sINTEGER; vec: ADDRESS): ADDRESS;
PROCEDURE Tickcal (): lCARDINAL;
TYPE PtrBPB = POINTER TO BPB;
BPB = RECORD
recsiz: sCARDINAL;
clsiz: sCARDINAL;
clsizb: sCARDINAL;
rdlen: sCARDINAL;
fsiz: sCARDINAL;
fatrec: sCARDINAL;
datrec: sCARDINAL;
numcl: sCARDINAL;
bflags: sCARDINAL;
END;
PROCEDURE Getbpb (drive: sINTEGER): ADDRESS;
PROCEDURE Bcostat (device: sINTEGER): BOOLEAN;
PROCEDURE Mediach (dev: sINTEGER): sINTEGER;
PROCEDURE Drvmap (): lBITSET;
CONST KRSHIFT = Bit0; (* Tastatur-Status *)
KLSHIFT = Bit1;
KCTRL = Bit2;
KALT = Bit3;
KCAPS = Bit4;
KRMOUSE = Bit5;
KLMOUSE = Bit6;
KRESERVED = Bit7;
PROCEDURE Kbshift (keys: sBITSET): sBITSET;
END MagicBIOS.